<?php


//后台管理
class Admin_controller extends CI_Controller{
	
	//后台管理文件夹
	public $_admin_dir;
	
	
	public function __construct()
	{
		parent::__construct();
		$this->load->helper('url');		
		$this->load->library('Auth');	
		$this->load->library('form_validation');
		if(!$this->auth->check_login())
		{
			redirect('adminroot/login?ref='.urlencode($this->uri->uri_string()));
		}
		
	}
}

//前台管理
class Base_Controller extends CI_Controller{
	public $_topdata;
	
	public function __construct()
	{
		parent::__construct();
	}
	
	public function top($id)
	{

		$this->load->model('category_mdl','category');
		$this->_topdata = $this->category->get_category_by_id($id,0);
		
	}
	
}